﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyDDD.AdminModule.Records.Entities
{
    [PrimaryKey(nameof(UserId), nameof(RoleId))]
    public record ApplicationUserRole : Models.ApplicationUserRole
    {
        [ForeignKey(nameof(ApplicationUser))]
        public override Guid UserId { get; set; } = default!;
        public virtual ApplicationUser ApplicationUser { get; set; } = default!;


        [ForeignKey(nameof(ApplicationRole))]
        public override Guid RoleId { get; set; } = default!;
        public virtual ApplicationRole ApplicationRole { get; set; } = default!;
    }
}
